The present invention relates to real-time signal processing, and more particularly to the real-time determination of a center value (centroid) of a waveform.
Often it is necessary to determine precisely a center value of a waveform, such as the wavelength value at which a peak of a waveform occurs in a signal representing light energy over a range of wavelengths, and to do so in a way that involves a small computational burden, so as to perform the calculation in xe2x80x9creal-timexe2x80x9d (i.e. performing the calculation at a rate sufficient to keep pace with the arrival of each new set of calculation inputs). For example, in many situations, it is necessary to determined the center value of a waveform in a signal of light reflected from a Bragg grating inscribed in an optical fiber. An optical fiber in which a Bragg grating is inscribed can be used as a component of a pressure sensor or as a component of an optical add/drop multiplexer. The wavelength of the light reflected by the Bragg grating (i.e. the center value of the peak in a signal corresponding to the reflected light) conveys information of use in the sensor and add/drop multiplexer applications.
The precision required for different applications varies, but a precision of better than 1 part in 300 of the full width at half maximum (FWHM) of a waveform is often required. A simple technique to determine the center of a waveform (i.e. e.g. the position of a peak in the waveform) uses a centroid (or center of mass) calculation over an area of interest. For an evenly sampled waveform having n sampled points, the basic equation for the calculation of the centroid of the waveform is:                               V          c                =                                            ∑                              i                =                1                            n                        ⁢                          xe2x80x83                        ⁢                                          V                i                            ⁢                              A                i                                                                        ∑                              i                =                1                            n                        ⁢                          xe2x80x83                        ⁢                          A              i                                                          (        1        )            
where Ai is the sampled amplitude at wavelength Vi (or some other parameter, besides wavelength). As seen in equation (1), each sample point is weighted by the amplitude at the sample point.
A centroid calculation according to equation (1) can be performed quickly is therefore useful as a real-time computer algorithm. Equation (1) can be used for example to determine the center wavelength Vc of a waveform where n measurements Ai of power level are taken at n different wavelengths Vi.
The number n of sampled points in the calculation is critical when using equation (1). Ideally, the samples span the entire waveform of interest. However, in practical applications this is not always possible due to factors such as sampling rates and memory requirements. When the samples do not span the entire waveform, a fixed number of sample points around the peak value of a waveform are used. However, the locations of the sampled points affect the determination of the waveform center, especially when the points are not perfectly symmetric about the actual waveform peak.
In a typical real-time application in which a centroid is determined, only a small number of sampled points of a waveform are available from which to determine the centroid of the waveform, sometimes as few as seven points and sometimes even fewer. Even with such a small number of sampled points however, if the sampled points are symmetric with respect to the true centroid, the calculation according to equation (1) will provide the true centroid. On the other hand, if the sampled points are unevenly distributed with respect to the true centroid, the calculation according to equation (1) will in general be skewed. (The use of equation (1) for some uneven distributions could still yield the correct centroid, as long as the sum of the moment arms (amplitude times wavelength) on one side of the true centroid balances the corresponding sum on the other side.)
A co-pending, co-owned application serial number 087447, filed May 29, 1998, entitled METHOD FOR IMPROVING THE ACCURACY IN THE DETERMINATION OF A WAVEFORM CENTER, discloses a method of correcting for skew in a calculation of a centroid of a waveform based on eliminating some of the sample points used in the calculation according to equation (1). In some situations, especially when the number of sample points is already a very small number, ignoring some of the sample points tends to increase error in the calculation of the centroid.
What is needed is a method for reducing skew in the calculation of the centroid of a waveform not based on only eliminating any of the sampled points, but rather based on adding points to be used in the calculation of the centroid.
Accordingly, the present invention provides a method and corresponding apparatus for determining the centroid (Vc) of a waveform signal indicating how the output of a system, such as the light reflected by a Bragg grating inscribed in an optical fiber, responds to an input signal, such as incident light, as the value of a characteristic of the input signal, such as the wavelength of the incident light, is varied over a predetermined range, the waveform being sampled at a set of parameter values (Vi, i=1, . . . , n) yielding a corresponding set of sampled amplitudes (Ai, i=1, . . . , n), each parameter value and corresponding amplitude forming a sampled point (Vi, Ai), the method including the steps of: selecting an amplitude at which to create an interpolated point; interpolating a first parameter value corresponding to the amplitude selected in the step of selecting an amplitude; and performing a centroid calculation using only the sampled points with an amplitude greater than a predetermined threshold.
In a further aspect of the invention, the amplitude selected in the step of selecting an amplitude is less than approximately twenty percent of the maximum sampled amplitude.
In another further aspect of the invention, the centroid (Vc) is calculated using as a formula:       V    c    =                              ∑                      i            =            1                    n                ⁢                  xe2x80x83                ⁢                              V            i                    ⁢                      A            i                                                ∑                      i            =            1                    n                ⁢                  xe2x80x83                ⁢                  A          i                      .  
In yet another further aspect of the invention, the waveform is sampled in the presence of background noise, and the method also includes the steps of: estimating the background (Bi) for each value in the set of parameter values at which sampling is performed; and reducing the amplitude (Ai) of each sampled amplitude by the background (Bi) so estimated.
In still yet another further aspect of the invention, there is, among the sampled amplitudes, a maximum sampled amplitude, and, in addition, the method also includes the step of interpolating a second parameter value to correspond to the amplitude selected in the step of selecting an amplitude, the second value on the opposite side from the first interpolated value of the maximum sampled amplitude.